package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.modules.entity.Comment;
import com.example.modules.vo.MyPostCommentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    Integer getCommentNum(@Param("postId") Integer postId);

    Integer delCommentByPostId(@Param("postId") Integer postId);

    Integer delCommentByPid(@Param("pid") Integer pid);

    List<MyPostCommentVO> getMyPostComment(@Param("userId") Integer userId);

    Integer getMyPostCommentTotal(@Param("userId") Integer userId);

    List<MyPostCommentVO> getReplyMyComments(@Param("userId") Integer userId);
}
